package Work4;
import java.util.Arrays;

public class TestDebug {

	public static void sort(int[] a) {
		System.out.println("enter sort");
		for (int i = a.length; --i >= 0;)
			for (int j = 0; j < i; j++) {
				if (a[j] > a[j + 1]) {
					swap(a, j, j + 1);
				}
			}
		System.out.println("quit sort");
	}

	public static void swap(int[] array, int i, int j) {
		System.out.println("enter swap");
		int temp = array[i];
		array[i] = array[j];
		array[j] = temp;
		System.out.println("quit swap");
	}

	public static void main(String[] args) {
		int[] intarray = new int[] { 1, 2, 3, 7, 9, 0, 5, 4 };
		sort(intarray);
		System.out.println(Arrays.toString(intarray));
	}

}